1. Technical Field
The present technical field relates in general to the field of data processing, and, in particular, to software. Still more particularly, the present technical field relates to optimizing the use of indexes.
2. Description of the Related Art
From a high-level perspective, a computer can be viewed as a collection of hardware that, under the control of a software operating system, executes software instructions to manipulate data (including values, images, etc.). Locating instructions and data in an efficient manner is critical for optimal operation of a computer. To facilitate locating such instructions and data, a variety of techniques is utilized. The most common techniques use indexes.
Simply stated, an index provides an efficient means for locating files through the use of a reference table. Typically, an index includes a table of contents for a computer file, and includes keys or references for locating specific elements of that computer file. For example, assume that data is stored in an array (“computer file”) named “ARRAY”. The third element (“specific element”) in the array may be called “ARRAY(3)”. Thus, the key “ARRAY” and the reference “3” allow a program to locate and retrieve the data by referencing “ARRAY” and “3”. If an index is used with a file directory tree, then an access path (e.g., Main directory/subdirectory/sub-subdirectory/folder/file) to the specific file can quickly be generated.
An index may incorporate the use of a pointer, an object, an offset value, or any other software used to reference data in an indexed manner. A pointer, as the name suggests, has a value that refers to (“points to”) another value or an address in memory. Such pointers provide a quick access to rows in a table, columns, etc.
Oftentimes, an index needs to be rebuilt. Events that prompt such index rebuilding include routine software maintenance, the installation of new programs, etc. When an operator attempts to shut down a computer system, either in a delayed or immediate mode, the system may be in the process of rebuilding one or more indexes. If the index rebuilding operation has not completed before the system is powered down, the index rebuilding work will be lost and must be performed again when the system is powered back up. This is extremely wasteful of the computer's resources. For example, if system jobs are rebuilding twelve indexes, and each index takes ten hours to rebuild, shutting down the system just before the end of the index rebuilding process will result in 120 hours of wasted computer time.